<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>sms form</title>
        <link href="../../script/seminar.css" rel="stylesheet">
        <script type="text/javascript">
            function fnClose() {
//                window.returnValue = 1;
//                var vWinOpener = window.opener;
//                vWinOpener.fnRefresh();
                self.close();
            }
            function fnSend() {
                document.smsForm.method = 'POST';
                document.smsForm.action = '../../logic/SendSms.php?pageCode=1';
                document.smsForm.submit();
            }
        </script>
    </head>
    <body>
        <?php
        include("../../utility/connection.php");
        include("../../utility/general.php");
        session_start();
        if (isset($_SESSION['arrResult'])) {
            $arrResult = $_SESSION['arrResult'];
            
            $init = strval($_GET["init"]);
            $noHpPembicara = '';
            if ($init == '1') {
                unset($_SESSION['MsgSent']);
                $noHpPembicara = strval($_GET["noHp"]);
            }
        ?>
        <form name="smsForm" id="smsForm">
        <table border="0" width="100%" height="100%">
            <tr valign="middle">
                <td align="center">
                    
                    <table width="100%" border="0" cellpadding="2" cellspacing="0">
                        <tr>
                            <td>
                                <table width="100%" border="0" cellpadding="5" cellspacing="0">
                                    <tr class="tbl-header">
                                        <td colspan="3">SMS FORM</td>
                                    </tr>
                                    <tr>
                                        <td>No&nbsp;HP</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><input type="text" name="txtNoHp" id="txtNoHp" style="width: 500px;" value="<?php echo $noHpPembicara ?>" /></td>
                                    </tr>
                                    <tr>
                                        <td>Pesan</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td>
                                            <textarea name="txtMessage" id="txtMessage" rows="5" cols="60">Mohon kirimkan informasi tambahan sehubungan dengan proposal anda.</textarea>
                                        </td>
                                    </tr>
                                    <tr class="tbl-header">
                                        <td colspan="3">
                                            <button type="button" name="btSend" id="btSend" onclick="fnSend()">Kirim</button>
                                            <button type="button" name="btClose" id="btClose" onclick="fnClose()">Tutup</button>
                                        </td>
                                    </tr>
                                </table>
                                <?php
                                if (isset($_SESSION['MsgSent'])) {
                                    $MsgSent = $_SESSION['MsgSent'];
                                    echo $MsgSent;
                                }
                                ?>
                            </td>
                        </tr>
                    </table>
                    
                </td>
            </tr>
        </table>
        </form>
        <?php
        }
        ?>
    </body>
</html>
